LOADING...

加载过慢请开启缓存(浏览器默认开启)

loading

xcode7中NSURLSession发送HTTP异常

2016/2/23 iOS iOS

今天在使用NSURLSession时候报了如下的错误:

    Application Transport Security has blocked a cleartext HTTP (http://) 
    resource load since it is insecure. Temporary exceptions can be configured 
    via your app's Info.plist file.

解决办法如下为在info.plist文件中添加:

<key>NSAppTransportSecurity</key>
    <dict>
        <key>NSAllowsArbitraryLoads</key>
        <true/>
    </dict>